/**
 * Created by lwy on 2017/7/3.
 */


    var id = GetQueryString('id');
if(id==''||id==null||id==undefined){
    var url = decodeURI(decodeURI(window.location.href)).split('=');
    var money = url[1].split('&')[0];
    var state = url[2].split('&')[0];
    var accountName = url[3].split('&')[0];
    var code = url[4].split('&')[0];
    var cardNum = url[5].split('&')[0];
    var factorage = url[6].split('&')[0];
    var bank = url[7].split('&')[0];
    var createTime = url[8].split('&')[0];
    var handTime = url[9];
    $('#money').html(money);
    $('#state').html(state);
    $('#factorage').html(factorage);
    $('#bankInfo').html(bank+"("+cardNum+")"+accountName);
    $('#code').html(code);
    $('#createTime1').html(createTime);
    $('#createTime2').html(createTime);
    if(state=='待审核'){
        $('#handTime').html('预计下周一')
    }else if(state=='审核通过'){
        $('#state').css('color','#49c9bc');
        $('#handTime').html(handTime);
        $('#appleImg').attr('src','../img/apple-state2.jpg');
        $('#appleImg').css('width','96px')
    }
}else{
    $.ajax({
        url:'/tiXianC/userGetTiXianShenQingDetails.json',
        dataType:'json',
        data:{
            token:getItem('token'),
            id:id,
        },
        success:function(data){
            if(data.code==1){
                var data = data.datas;
                $('#money').html(data.money);
                $('#state').html(data.state);
                $('#factorage').html(data.factorage);
                $('#bankInfo').html(data.bankName+"("+data.cardNum+")"+data.accountName);
                $('#code').html(data.code);
                $('#createTime1').html(data.createTime);
                $('#createTime2').html(data.createTime);
                if(data.state=='待审核'){
                    $('#handTime').html('预计下周一')
                }else if(data.state=='审核通过'){
                    $('#state').css('color','#49c9bc');
                    $('#handTime').html(data.handTime);
                    $('#appleImg').attr('src','../img/apple-state2.jpg');
                    $('#appleImg').css('width','96px')
                }
            }
        }
    })
}
